﻿/**********************************************************************
 * @file   OperatorsOpen.h
 * @brief  创建打开工程文件事件响应
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2024-09-25
 *********************************************************************/
#ifndef _OperatorsOpen_H
#define _OperatorsOpen_H

#include "FITK_Kernel/FITKCore/FITKActionOperator.h"
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"

namespace ModelOper
{
    /**
     * @brief 打开工程文件操作器
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-10-31
     */
    class OperatorsOpen :public Core::FITKActionOperator
    {
        Q_OBJECT;
    public:
        /**
         * @brief Construct a new Operators Open object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-31
         */
         explicit OperatorsOpen();
         /**
          * @brief Destroy the Operators Open object
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-10-31
          */
        virtual ~OperatorsOpen();
        /**
         * @brief 执行界面操作
         * @return true     执行成功
         * @return false     执行失败
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-31
         */
        virtual bool execGUI() override;
        /**
         * @brief 执行读入操作
         * @return true     执行成功
         * @return false     执行失败
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-31
         */
        virtual bool execProfession() override;

        /**
         * @brief 在读入hdf5后 执行刷新操作
         * @author yangjing (1195810980@qq.com)
         * @date 2025-2-25
         */
        void upGroupTreeAndTreeWidgetLoad();


    private slots:
        /**
         * @brief 读取线程结束执行该槽函数
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-03-26
         */
        void ioThreadFinishedSlot();

    };

    // 按钮注册相关操作
    Register2FITKOperatorRepo(actionOpen, OperatorsOpen);
}

#endif